Defines a low level graphics interface for drawing content on PDF pages.
The methods in this class match the PDF operators defined in the PDF specification.
A PDFContentStream object is created from a object and lets you inject specific PDF operators in the object, operators that are not available through the public API.
This class gives you full control over the generated page content but it requires good knowledge of PDF specification.
Initializes a new PDFContentStream Object.
Adds the given operator to the content stream.
Begins a compatibility section. Operator: BX.
Begins an inline image. Operator: BI.
Begins the data section of an inline image. Operator: ID.
Begins a marked-content sequence.
Begins a marked-content sequence with an associated property list.
Begins a text section. Operator: BT.
Append a cubic Bézier curve to the current path. Operator: c
Clears the entire content stream.
Closes and strokes the current path. Operator: s.
Closes the current path, fills the path using the fillMode and then strokes the path. Operator: b for PDFFillMode.NonZeroWinding or b* for PDFFillMode.EvenOdd.
Closes the current path. Operator: h.
Concatenates the given matrix with the current transformation matrix. Operator: cm
Defines a marked-content point.
Defines a marked-content point with an associated property list.
Ends a compatibility section. Operator: EX.
Ends an inline image. Operator: EI.
Ends a marked content section. Operator: EMC.
Ends the current path. Operator: n.
Ends a text section. Operator: ET.
Fills the current path using the fillMode and then strokes the path. Operator: B for PDFFillMode.NonZeroWinding or B* for PDFFillMode.EvenOdd.
Fills the current path using the fillMode. Operator: f for PDFFillMode.NonZeroWinding or f* for PDFFillMode.EvenOdd.
Appends a line segment to current path from current point to (x, y). Operator: l
Moves the text position. Operator: Td
Moves the text position. Operator: TD
Begins a new subpath at (x, y). Operator: m
Moves to the start of the next line. Operator: T*
Appends a rectangle to current path. Operator: re
Resets the coordinate system to default PDF coordinate system.
Restores the current graphics state. Operator: Q.
Restores the coordinate system as it has been setup initially by class.
Saves the current graphics state. Operator: q.
Sets the character spacing. Operator: Tc
Sets the current path as clipping path. Operator: W for PDFFillMode.NonZeroWinding or W* for PDFFillMode.EvenOdd.
Sets the current colorspace for fill operations to DeviceCMYK and sets the current CMYK color. Operator: k
Sets the current colorspace for stroke operations to DeviceCMYK and sets the current CMYK color. Operator: K
Sets the current graphics state in the content stream. Operator: gs
Sets the current fill color. Operator: sc
Sets the current fill color. Operator: scn
Sets the current fill color. Operator: scn
Sets the current fill color and pattern. Operator: scn
Sets the fill colorspace. Operator: cs
Set the flatness tolerance in the graphics state. Operator: i
Sets the current colorspace for fill operations to DeviceGray and sets the gray level. Operator: g
Sets the current colorspace for stroke operations to DeviceGray and sets the gray level. Operator: g
Set the line cap style in the graphics state. Operator: J
Sets the dash offset and pattern for stroke operations. Operator: d
Set the line join style in the graphics state. Operator: j
Sets the line width in the graphics state.
Set the miter limit in the graphics state. Operator: M
Sets the current colorspace for fill operations to DeviceRGB and sets the current RGB color. Operator: rg
Sets the current colorspace for stroke operations to DeviceRGB and sets the current RGB color. Operator: RG
Sets the current stroke color. Operator: SC
Sets the current stroke color. Operator: SCN
Sets the current stroke color. Operator: scn
Sets the current stroke color and pattern. Operator: SCN
Sets the stroke colorspace. Operator: CS
Sets the current font and size for text show operators. Operator: Tf
Sets the text horizontal scaling. Operator: Tz
Sets the text leading. Operator: TL
Sets the current text matrix and text line matrix. Operator: Tm
Sets the text rendering mode. Operator: Tr
Sets the text rise. Operator: Ts
Sets the word spacing. Operator: Tw
Shows a form XObject on the page. Operator: Do
Shows an image on the page. Operator: Do
Shows a shading on the page. Operator: sh
Shows the specified text on the page. Operator: Tj
Shows one or more text strings, allowing individual glyph positioning.
Strokes the current path. Operator: S.
Append a cubic Bézier curve to the current path. Operator: v
Writes the specified byte to the content stream.
Writes the specified bytes to the content stream.
Writes the specified bytes to the content stream.
Append a cubic Bézier curve to the current path. Operator: y